using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[CreateAssetMenu(menuName = "Data/State/Player/PlayerRun", fileName = "PlayerRun")]
public class PlayerState_Walk : PlayerState
{
    //
    public override void Enter()
    {
        base.Enter();
    }
    
    //
    public override void Exit()
    {
        base.Exit();
    }
    
    //
    public override void LogicUpdate()
    {
        base.LogicUpdate();
        // 玩家不在移动 或者 鼠标状态为AStar寻路状态
        if (!PlayerInput.Instance.GetIsInputMove || PlayerInput.Instance.MouseState == MouseState.AStar)
        {
            stateMachine.SwitchState(stateMachine.stateTable[typeof(PlayerState_Idle)]);
        }
    }
    
    //
    public override void PhysicalUpdate()
    {
        base.PhysicalUpdate();
    }
}
